import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export function createRouter () {
  console.log(process.env.NODE_ENV)

  return new Router({
    mode: process.env.NODE_ENV==='development'?'hash':'history',
    routes: [
        { path: '/', component: () => import('./components/one.vue') },
        { path: '/two', component: () => import('./components/two.vue') }
    ]
  })
}